home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / +look_here_1st!+ / reader_requests / voiceshell / install < prev    next >
Text File  |  1997-12-05  |  8KB  |  411 lines

  1. ;$VER: Install 1.02 (19.01.1995) (C) Copyright Tomi Blinnikka 1995-96
  2.  
  3. (complete 0)
  4.  
  5. (set action
  6.     (askchoice
  7.         (prompt "Please choose action:")
  8.         (help "You can either install or remove VoiceShell with this utility.\n\n" @askchoice-help)
  9.         (choices "Install" "Remove")
  10.         (default 0)
  11.     )
  12. )
  13.  
  14. (if (= action 0)
  15.  
  16. (
  17.  
  18.     (set vs-dest
  19.         (tackon 
  20.             (askdir
  21.                 (prompt "In which disk or drawer should VoiceShell and utilities be installed?\nA new drawer named VoiceShell will be created.")
  22.                 (help @askdir-help)
  23.                 (default @default-dest)
  24.             )
  25.         "VoiceShell"
  26.         )
  27.     )
  28.     (makedir vs-dest (infos))
  29.     (set @default-dest vs-dest)
  30.  
  31.  
  32.     (complete 35)
  33.  
  34.     (copyfiles
  35.         (source "VoiceShell")
  36.         (choices "VoiceShell" "VSConv")
  37.         (dest vs-dest)
  38.         (prompt "Which files should be copied?")
  39.         (help @copyfiles-help)
  40.         (infos)
  41.         (files)
  42.         (confirm)
  43.     )
  44.  
  45.  
  46.     (complete 41)
  47.  
  48.     (copyfiles
  49.         (prompt "Which languages should be installed?")
  50.         (help @copyfiles-help)
  51.         (source "VoiceShell/Catalogs")
  52.         (dest "LOCALE:Catalogs")
  53.         (all)
  54.         (infos)
  55.         (noposition)
  56.         (confirm)
  57.     )
  58.  
  59.     (complete 44)
  60.  
  61.     (set vsrexx-dest
  62.         (askdir
  63.             (prompt "Where should the script files be installed?")
  64.             (help @askdir-help)
  65.             (default "REXX:")
  66.         )
  67.     )
  68.  
  69.     (copyfiles
  70.         (source "VoiceShell/Scripts")
  71.         (dest vsrexx-dest)
  72.         (prompt "Which script files should be installed?")
  73.         (help @copyfiles-help)
  74.         (all)
  75.         (files)
  76.         (confirm)
  77.     )
  78.  
  79.  
  80.     (complete 56)
  81.  
  82.     (set vsguide-dest
  83.         (askdir
  84.             (prompt "Where should the AmigaGuide help files be installed?")
  85.             (help @askdir-help)
  86.             (default "Guide:")
  87.         )
  88.     )
  89.  
  90.  
  91.     (complete 65)
  92.  
  93.     (copyfiles
  94.         (source "VoiceShell/Documents")
  95.         (dest vsguide-dest)
  96.         (prompt "Which documents should be installed?")
  97.         (help @copyfiles-help)
  98.         (infos)
  99.         (choices "VoiceShell.guide" "VSConv.guide")
  100.         (files)
  101.     )
  102.  
  103.  
  104.     (complete 71)
  105.  
  106.         (if (= (askbool
  107.             (prompt "Do you wish to install the Assembler source files?")
  108.             (help "Selecting 'Yes' will allow you specify a directory for the source files.")
  109.             )
  110.         1)
  111.  
  112.         (
  113.             (set vssource-dest
  114.                 (askdir
  115.                     (prompt "Where should the Assembler source files be installed?")
  116.                     (help @askdir-help)
  117.                     (default vs-dest)
  118.                 )
  119.             )
  120.  
  121.  
  122.             (copyfiles
  123.                 (source "VoiceShell/Source")
  124.                 (dest vssource-dest)
  125.                 (prompt "Which Assembler source files should be installed?")
  126.                 (help @copyfiles-help)
  127.                 (all)
  128.                 (files)
  129.                 (confirm)
  130.             )
  131.  
  132.         ))
  133.  
  134.     (complete 83)
  135.  
  136.     (copylib
  137.         (prompt "Copying voice.library to LIBS:.")
  138.         (source "VoiceShell/Libs/voice.library")
  139.         (dest "LIBS:")
  140.         (help @copylib-help)
  141.         (confirm)
  142.     )
  143.  
  144.     (complete 88)
  145.  
  146.     (startup "VoiceShell"
  147.         (help @startup-help)
  148.         (prompt
  149.         "Some commands need to be added to the \"S:User-Startup\".")
  150.         (command "Path \""vs-dest"\" ADD\n")
  151.         )
  152.  
  153.  
  154.     (complete 90)
  155.  
  156.     (while (= (askbool
  157.         (prompt "Do you wish to update (more) data files?")
  158.         (help "Selecting 'Yes' will allow you to convert VCLI and old VoiceShell data files for the current version.")
  159.         )
  160.     1)
  161.  
  162.     (
  163.         (set prefs "")
  164.         (set data "")
  165.         (set vsdata-dest "")
  166.         (set OK 0)
  167.         (set file "")
  168.         (set delfile "")
  169.  
  170.         (set data
  171.             (askfile
  172.                 (prompt "Please give data file")
  173.                 (help @askfile-help)
  174.                 (default "VoiceShell.DAT")
  175.             )
  176.         )
  177.  
  178.         (if (= (askbool
  179.             (prompt "Do you wish to associate a prefs file with this data file?")
  180.             (help "Selecting 'Yes' will allow you specify a VoiceShell prefs file to be used with the selected data file.")
  181.             )
  182.         1)
  183.  
  184.             (set prefs
  185.                 (askfile
  186.                     (prompt "Please give prefs file")
  187.                     (help @askfile-help)
  188.                     (default "ENVARC:VoiceShell.PREFS")
  189.                 )
  190.             )
  191.         )
  192.  
  193.         (set vsdata-dest
  194.             (askfile
  195.                 (prompt "Please a name for destination file")
  196.                 (help @askfile-help)
  197.                 (default "Project.VS")
  198.             )
  199.         )
  200.  
  201.             (set file (cat "VoiceShell/VSConv FROM \"" data "\" \"" prefs "\" TO \"" vsdata-dest "\""))
  202.  
  203.             (Set OK
  204.                 (run file)
  205.             )
  206.  
  207.             (if (= OK 5)
  208.                 (message "VSConv had a problem with the specified prefs file. Used defaults.")
  209.             )
  210.             (if (= OK 20)
  211.                 (abort "Sorry, a fatal error occured during conversion. File not converted.")
  212.                 (if (= (askbool
  213.                     (prompt "Do you wish to delete the old data and prefs files?")
  214.                     (help "Selecting 'Yes' will destroy the specified files.")
  215.                     )
  216.                 1)
  217.                     (set delfile (cat "Delete \"" data "\" \"" prefs "\ QUIET"))
  218.                     (run delfile)
  219.                 )
  220.             )
  221.  
  222.     )
  223.  
  224.     )
  225.  
  226.     (complete 100)
  227.  
  228.     (exit)
  229.  
  230. ))
  231.  
  232. (if (= action 1)
  233.  
  234. (
  235.  
  236.     (set @abort-button "Abort Removal")
  237.  
  238.     (if (= 1 (exists "C:VoiceShell" (noreq)))
  239.         (
  240.             (if (= (askbool
  241.                 (prompt "Going to delete C:VoiceShell. \n\nAre you sure you want to continue?")
  242.                 (help "Selecting 'Proceed' will destroy the specified file.")
  243.                 (choices "Proceed" "Skip This Part")
  244.                 )
  245.             1)
  246.  
  247.                 (
  248.                     (run "Delete C:VoiceShell QUIET")
  249.                     (run "Delete C:VoiceShell.info QUIET")
  250.                 )
  251.             )
  252.         )
  253.     )
  254.  
  255.     (complete 6)
  256.  
  257.     (set name
  258.         (askdir
  259.             (prompt "Where is VoiceShell installed?")
  260.             (help @askdir-help)
  261.             (default @default-dest)
  262.         )
  263.     )
  264.  
  265.     (complete 10)
  266.  
  267.  
  268.     (if (= (askbool
  269.         (prompt "Do you wish to delete the directory \"" name "\"?\n\nNote! The directory itself may still exist after this procedure. After this program is finished, please reset your Amiga and re-run this program to remove the directory.")
  270.         (help "Selecting 'Proceed' will destroy the directory and everything in it")
  271.         (choices "Proceed" "Skip This Part")
  272.         )
  273.     1)
  274.  
  275.         (
  276.             (set file (cat "Delete \"" name "\" ALL FORCE"))
  277.             (run file)
  278.  
  279.             (set file (cat "Delete \"" name ".info\""))
  280.             (run file)
  281.         )
  282.     )
  283.  
  284.     (complete 32)
  285.  
  286.     (startup "VoiceShell"
  287.         (help @startup-help)
  288.         (prompt
  289.         "Some commands might need to be removed from \"S:User-Startup\".\n\nNote! Two lines will still remain! Please remove these yourself.")
  290.         (command "")
  291.         )
  292.  
  293.     (complete 38)
  294.  
  295.     (if (= (askbool
  296.         (prompt "Going to delete ALL files in the S: directory that have 'VoiceShell' in file name.\n\nAre you sure you want to continue?")
  297.         (help "Selecting 'Proceed' will destroy the specified files.")
  298.         (choices "Proceed" "Skip This Part")
  299.         )
  300.     1)
  301.  
  302.         (run "Delete S:#?VoiceShell#? QUIET")
  303.     )
  304.  
  305.     (complete 44)
  306.  
  307.  
  308.     (if (= (askbool
  309.         (prompt "Going to delete ALL files in the S: directory that have the postfix '.VS'.\n\nAre you sure you want to continue?")
  310.         (help "Selecting 'Proceed' will destroy the specified files.")
  311.         (choices "Proceed" "Skip This Part")
  312.         )
  313.     1)
  314.  
  315.         (run "Delete S:#?.VS QUIET")
  316.     )
  317.  
  318.     (complete 57)
  319.  
  320.  
  321.     (if (= (askbool
  322.         (prompt "Going to delete ALL files in the ENVARC: directory that have 'VoiceShell' in file name.\n\nAre you sure you want to continue?")
  323.         (help "Selecting 'Proceed' will destroy the specified files.")
  324.         (choices "Proceed" "Skip This Part")
  325.         )
  326.     1)
  327.  
  328.         (run "Delete ENVARC:#?VoiceShell#? QUIET")
  329.     )
  330.  
  331.     (complete 65)
  332.  
  333.  
  334.     (if (= (askbool
  335.         (prompt "Going to delete VoiceShell ARexx scripts from REXX:.\n\nAre you sure you want to continue?")
  336.         (help "Selecting 'Proceed' will destroy the specified files.")
  337.         (choices "Proceed" "Skip This Part")
  338.         )
  339.     1)
  340.         (
  341.             (run "Delete REXX:VSOn.rexx QUIET")
  342.             (run "Delete REXX:VSOff.rexx QUIET")
  343.             (run "Delete REXX:VSOn QUIET")
  344.             (run "Delete REXX:VSOff QUIET")
  345.         )
  346.     )
  347.  
  348.     (complete 78)
  349.  
  350.  
  351.     (delete "LIBS:voice.library"
  352.         (prompt "Going to delete Libs:voice.library.\n\nAre you sure you want to continue?")
  353.         (help @delete-help)
  354.         (confirm)
  355.         (optional force askuser)
  356.     )
  357.  
  358.     (delete "LOCALE:Catalogs/suomi/voiceshell.catalog"
  359.         (prompt "Going to delete LOCALE:Catalogs/suomi/voiceshell.catalog.\n\nAre you sure you want to continue?")
  360.         (help @delete-help)
  361.         (confirm)
  362.         (optional force askuser)
  363.     )
  364.  
  365.  
  366.     (complete 87)
  367.  
  368.  
  369.     (if (= 2 (exists "Guide:" (noreq)))
  370.         (
  371.             (if (= (askbool
  372.                 (prompt "Going to delete Guide:VoiceShell.guide.\n\nAre you sure you want to continue?")
  373.                 (help "Selecting 'Proceed' will destroy the specified file.")
  374.                 (choices "Proceed" "Skip This Part")
  375.                 )
  376.             1)
  377.  
  378.                 (
  379.                     (run "Delete Guide:VoiceShell.guide QUIET")
  380.                     (run "Delete Guide:VoiceShell.guide.info QUIET")
  381.                 )
  382.             )
  383.  
  384.             (complete 93)
  385.  
  386.             (if (= (askbool
  387.                 (prompt "Going to delete Guide:VSConv.guide.\n\nAre you sure you want to continue?")
  388.                 (help "Selecting 'Proceed' will destroy the specified file.")
  389.                 (choices "Proceed" "Skip This Part")
  390.                 )
  391.             1)
  392.  
  393.                 (
  394.                     (run "Delete Guide:VSConv.guide QUIET")
  395.                     (run "Delete Guide:VSConv.guide.info QUIET")
  396.                 )
  397.             )
  398.  
  399.             (complete 98)
  400.  
  401.         )
  402.     )
  403.  
  404.     (complete 100)
  405.  
  406.     (message "Removal Complete!\n\nVoiceShell should now be removed from your system. Some data files may still exist.")
  407.  
  408.     (exit (quiet))
  409.  
  410. ))
  411.